<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function getmax(a, b) {
            return a > b ? a : b;
        }

        function getMax(a, b, c) {
            return (a > b ? a : b) > c ? (a > b ? a : b) : c;
        }
        var a = 6.99;
        var b = 6.88;
        console.log(a + "与" + b + "相比" + getmax(a, b) + "更大<br>");
        var x = 40;
        var y = 70;
        var z = 10;
        console.log(x + "与" + z + "与" + z + "相比" + getMax(x, y, z) + "更大<br>");
    </script>
</body>

</html>